import com.light.hessian.exporter.registry.HessianExporterAutoRegister;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * Created by zhaojun on 2017/04/27.
 */
@Configuration
@Import(MybatisConfig.class)
@ComponentScan(basePackages = {"com.hessian.test.service"})
@EnableTransactionManagement
@EnableAspectJAutoProxy
public class HessianConfig  {

    @Bean
    HessianExporterAutoRegister exporterAutoRegister(){
        HessianExporterAutoRegister autoRegister=new HessianExporterAutoRegister();
        autoRegister.setConfig("registry-config.properties");
        return autoRegister;
    }

}
